//
//  NSFileManager+ZMAdd.m
//  ZMKitDemo
//
//  Created by zm on 2018/6/21.
//  Copyright © 2018年 zm. All rights reserved.
//

#import "NSFileManager+ZMAdd.h"

@implementation NSFileManager (ZMAdd)

+(NSString *)documentsPath {
    return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
}

+(NSURL *)documentsURL {
    return [[[self defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}

+(NSString *)cachesPath {
    return [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
}

+(NSURL *)cachesURL {
    return [[[self defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] lastObject];
}

+(NSString *)libraryPath {
    return [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) firstObject];
}

+(NSURL *)libraryURL {
    return [[[self defaultManager] URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
}


@end
